import request from '@/utils/request'

/**
 * 计划招聘岗位列表
 */
export function hrmRecruitPositionQueryListAPI(data) {
  return request({
    url: 'hrmRecruitPosition/queryRecruitPositionPageList',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 计划招聘岗位详情
 */
export function hrmRecruitPositionQueryByIdAPI(positionId) {
  return request({
    url: 'hrmRecruitPosition/queryById/' + positionId,
    method: 'post',
  })
}

/**
 * 计划招聘岗位新增
 */
export function hrmRecruitPositionAddAPI(data) {
  return request({
    url: 'hrmRecruitPosition/addRecruitPosition',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 计划招聘岗位修改
 */
export function hrmRecruitPositionSetAPI(data) {
  return request({
    url: 'hrmRecruitPosition/setRecruitPosition',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 计划招聘岗位删除
 */
export function hrmRecruitPositionDeleteAPI(data) {
  return request({
    url: 'hrmRecruitPosition/batchDeleteRecruitPosition',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 计划招聘岗位导出
 */
export function hrmRecruitPositionExportAPI(data) {
  return request({
    url: 'hrmRecruitPosition/exportRecruitPosition',
    method: 'post',
    data: data,
    responseType: 'blob',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 获取导入模板
 * @param {*} data
 */
export function positionImportTemplateAPI() {
  return request({
    url: 'hrmRecruitPosition/downloadExcel',
    method: 'post',
    responseType: 'blob',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 导入
 * @param {*} data
 */
export function positionExcelImportAPI(data) {
  return request({
    url: 'hrmRecruitPosition/excelImport',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}